home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / imgILoader.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  113 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is mozilla.org code.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications Corporation.
  20.  * Portions created by the Initial Developer are Copyright (C) 2001
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Stuart Parmenter <pavlov@netscape.com>
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  28.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #include "nsISupports.idl"
  41.  
  42. interface imgIDecoderObserver;
  43. interface imgIRequest;
  44.  
  45. interface nsIChannel;
  46. interface nsILoadGroup;
  47. interface nsIStreamListener;
  48. interface nsIURI;
  49.  
  50. interface nsISimpleEnumerator;
  51.  
  52. #include "nsIRequest.idl" // for nsLoadFlags
  53.  
  54. /**
  55.  * imgILoader interface
  56.  *
  57.  * @author Stuart Parmenter <pavlov@netscape.com>
  58.  * @version 0.3
  59.  * @see imagelib2
  60.  */
  61. [scriptable, uuid(a32826ff-9e56-4425-a811-97a8dba64ff5)]
  62. interface imgILoader : nsISupports
  63. {
  64.   /**
  65.    * Start the load and decode of an image.
  66.    * @param aURI the URI to load
  67.    * @param aInitialDocumentURI the URI that 'initiated' the load -- used for 3rd party cookie blocking
  68.    * @param aReferrerURI the 'referring' URI
  69.    * @param aLoadGroup Loadgroup to put the image load into
  70.    * @param aObserver the observer
  71.    * @param aCX some random data
  72.    * @param aLoadFlags Load flags for the request
  73.    * @param aCacheKey cache key to use for a load if the original
  74.    *                  image came from a request that had post data
  75.    * @param aRequest A newly created, unused imgIRequest object or NULL for one to
  76.                      be created for you.
  77.  
  78.  
  79.    * libpr0n does NOT keep a strong ref to the observer; this prevents
  80.    * reference cycles.  This means that callers of loadImage should
  81.    * make sure to Cancel() the resulting request before the observer
  82.    * goes away.
  83.    */
  84.   imgIRequest loadImage(in nsIURI aURI,
  85.                         in nsIURI aInitialDocumentURL,
  86.                         in nsIURI aReferrerURI,
  87.                         in nsILoadGroup aLoadGroup,
  88.                         in imgIDecoderObserver aObserver,
  89.                         in nsISupports aCX,
  90.                         in nsLoadFlags aLoadFlags,
  91.                         in nsISupports cacheKey,
  92.                         in imgIRequest aRequest);
  93.  
  94.   /**
  95.    * Start the load and decode of an image.
  96.    * @param uri the URI to load
  97.    * @param aObserver the observer
  98.    * @param cx some random data
  99.    *
  100.    * libpr0n does NOT keep a strong ref to the observer; this prevents
  101.    * reference cycles.  This means that callers of loadImageWithChannel should
  102.    * make sure to Cancel() the resulting request before the observer goes away.
  103.    */
  104.   imgIRequest loadImageWithChannel(in nsIChannel aChannel, in imgIDecoderObserver aObserver, in nsISupports cx, out nsIStreamListener aListener);
  105.  
  106.   /**
  107.    * Checks if a decoder for the an image with the given mime type is available
  108.    * @param mimeType The type to find a decoder for
  109.    * @return true if a decoder is available, false otherwise
  110.    */
  111.   boolean supportImageWithMimeType(in string mimeType);
  112. };
  113.